import request from '../base.js'
const HOST = 'db'

export const db = {
  testConnect: async (params) => {
    return await request('post', HOST + '/testConnect', params, 'json')
  },
  save: async (params) => {
    return await request('post', HOST + '/save', params, 'json')
  }
}

// 支持async/await用法
// async function getUser() {
//   try {
//     const response = await axios.post(url[, data[, config]])
//     console.log(response);
//   } catch (error) {
//     console.error(error);
//   }
// }